//
//  EchoServer.h
//  EchoServer
//
//  Created by Arthur on 15/6/5.
//  Copyright (c) 2015年 Arthur. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef NS_ENUM(NSUInteger, BSDServerErrorCode) {
    NOERROR,
    SOCKETERROR,
    BINDERROR,
    LISTENERROR,
    CFSOCKETCREATEERROR,
    ACCEPTINGERROR
};

@interface EchoServer : NSObject
@property (nonatomic) CFSocketRef socketRef;
@property (nonatomic) int lisenfd;
@property (nonatomic) int errorCode;

- (instancetype)initOnPort:(int)port;

@end
